class Person:
    species = "Homo sapiens"  # 类属性

    def __init__(self, name, age):
        self.name = name
        self.age = age

    # 实例方法
    def greet(self):
        print(f"Hello, my name is {self.name}.")

    # 类方法
    @classmethod
    def get_species(cls):
        return cls.species

    # 静态方法
    @staticmethod
    def is_adult(age):
        return age >= 18


# 创建实例
person1 = Person("Alice", 30)

# 调用实例方法
person1.greet()  # Hello, my name is Alice.

# 调用类方法
print(Person.get_species())  # Homo sapiens

# 调用静态方法
print(Person.is_adult(30))  # True
